This is one of a series of functions able to generate a number of variations from a symbol-pattern. The 'theme' symbol-pattern is always stated first in the output followed sequentially by the number of variants.
(setq mel (gen-variants-t 0.341 3 nil '(a b c d)))
--> (a b c d c b d e e f f f g e g f)
Each variant is transposed up one symbol position, (a b c d) becoming (b c d e) and so on. Use this to create templates for pick operations.
&optional step value allows the variation sequence to be entered as any point. For example:
(setq mel1 (gen-variants-t 0.341 3 3 '(a b c d)))
--> (a b c d e d f g)
Or, more extreme:
(gen-variants-t 0.341 3 5 '(a b c d))
--> (a b c d g f h i g h h h g e g f)
Should you wish to remove the 'theme' from the output statement use the nthcdr function:
(setq mel2 (nthcdr 4 (gen-variants-t nil 3 nil '(a b c d))))